return
, and
/or
¶return
¶blue_trail.py
¶Move Bit along the blue trail. Stop when the blue stops, or when Bit is blocked in front.
and
¶print(True and True)
True
print(True and False)
False
print(False and False)
False
blue_trail_and.py
¶or
¶cross_the_pond.py
¶The green squares above blue are lilypads. They don't jump away as Bit passes by.
The red squares above black are flowers. They don't jump either.
The green squares above black is a frog. It will jump if Bit passes by.
Move Bit to the other side of the pond and clear the frogs.
When you hear
Move until condition is true
Think
while not condition:
bit.move()
return
and
, or